/**
 * AluiCommons -  http://code.google.com/p/alui-toolbox/
 * Copyright (c) 2008-2009
 * by Fabien Sanglier
 * 
 * This file is part of AluiCommons.
 * 
 * AluiCommons is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * AluiCommons is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with AluiCommons.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

using System;
using System.Data;
using System.Configuration;
using com.plumtree.server;

namespace AluiServerLib.Business
{
    public class ALUIPortlet : BaseALUIObject, IPTGadget
    {
        IPTGadget m_InternalObject = null;

        public ALUIPortlet()
		{}

        public ALUIPortlet(int objid)
        {
            this.objectid = objid;
        }

        public override IPTObject GetInternal()
        {
            return m_InternalObject;
        }

        public override void Inflate(IPTSession ptSession, bool lockObject)
        {
            if (this.objectid > 0)
            {
                IPTObjectManager ptGadgetManager = ptSession.GetGadgets();
                this.m_InternalObject = (IPTGadget)ptGadgetManager.Open(this.objectid, lockObject);
            }
        }

        #region IPTGadget Members

        public void AddMandatoryGroup(int lGroupID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetAlignment()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public string GetGadgetBrowserCLSID()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public string GetGadgetProviderCLSID()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetGadgetTemplateID()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetGadgetType()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public object[][] GetHTMLText(object vAppDataStateObject)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetMandatoryGadgetOrder()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public com.plumtree.openfoundation.util.IXPPropertyBag GetProviderInfo()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public bool GetSuppressTitleBar()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public int GetWebServiceID()
        {
            return m_InternalObject.GetWebServiceID();
        }

        public void Initialize(string bstrGadgetProviderCLSID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public IPTQueryResult QueryMandatoryGroups()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void RemoveMandatoryGroup(int lGroupID)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetAlignment(int Value)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetGadgetTemplateID(int Value)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetGadgetType(int Value)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetMandatoryGadgetOrder(int Value)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetProviderInfo(object Value)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetSuppressTitleBar(bool Value)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public void SetWebServiceID(int Value)
        {
            m_InternalObject.SetWebServiceID(Value);
        }

        #endregion
    }
}
